Integrand size = 33, antiderivative size = 141 \[ \int \frac {\cos ^2(c+d x) \left (A+C \cos ^2(c+d x)\right )}{(a+a \cos (c+d x))^2} \, dx=\frac {(2 A+7 C) x}{2 a^2}-\frac {4 (A+4 C) \sin (c+d x)}{3 a^2 d}+\frac {(2 A+7 C) \cos (c+d x) \sin (c+d x)}{2 a^2 d}-\frac {2 (A+4 C) \cos ^2(c+d x) \sin (c+d x)}{3 a^2 d (1+\cos (c+d x))}-\frac {(A+C) \cos ^3(c+d x) \sin (c+d x)}{3 d (a+a \cos (c+d x))^2} \]
1/2*(2*A+7*C)*x/a^2-4/3*(A+4*C)*sin(d*x+c)/a^2/d+1/2*(2*A+7*C)*cos(d*x+c)* sin(d*x+c)/a^2/d-2/3*(A+4*C)*cos(d*x+c)^2*sin(d*x+c)/a^2/d/(1+cos(d*x+c))- 1/3*(A+C)*cos(d*x+c)^3*sin(d*x+c)/d/(a+a*cos(d*x+c))^2
Time = 1.45 (sec) , antiderivative size = 273, normalized size of antiderivative = 1.94 \[ \int \frac {\cos ^2(c+d x) \left (A+C \cos ^2(c+d x)\right )}{(a+a \cos (c+d x))^2} \, dx=\frac {\cos \left (\frac {1}{2} (c+d x)\right ) \sec \left (\frac {c}{2}\right ) \left (36 (2 A+7 C) d x \cos \left (\frac {d x}{2}\right )+36 (2 A+7 C) d x \cos \left (c+\frac {d x}{2}\right )+24 A d x \cos \left (c+\frac {3 d x}{2}\right )+84 C d x \cos \left (c+\frac {3 d x}{2}\right )+24 A d x \cos \left (2 c+\frac {3 d x}{2}\right )+84 C d x \cos \left (2 c+\frac {3 d x}{2}\right )-144 A \sin \left (\frac {d x}{2}\right )-381 C \sin \left (\frac {d x}{2}\right )+96 A \sin \left (c+\frac {d x}{2}\right )+147 C \sin \left (c+\frac {d x}{2}\right )-80 A \sin \left (c+\frac {3 d x}{2}\right )-239 C \sin \left (c+\frac {3 d x}{2}\right )-63 C \sin \left (2 c+\frac {3 d x}{2}\right )-15 C \sin \left (2 c+\frac {5 d x}{2}\right )-15 C \sin \left (3 c+\frac {5 d x}{2}\right )+3 C \sin \left (3 c+\frac {7 d x}{2}\right )+3 C \sin \left (4 c+\frac {7 d x}{2}\right )\right )}{48 a^2 d (1+\cos (c+d x))^2} \]
(Cos[(c + d*x)/2]*Sec[c/2]*(36*(2*A + 7*C)*d*x*Cos[(d*x)/2] + 36*(2*A + 7* C)*d*x*Cos[c + (d*x)/2] + 24*A*d*x*Cos[c + (3*d*x)/2] + 84*C*d*x*Cos[c + ( 3*d*x)/2] + 24*A*d*x*Cos[2*c + (3*d*x)/2] + 84*C*d*x*Cos[2*c + (3*d*x)/2] - 144*A*Sin[(d*x)/2] - 381*C*Sin[(d*x)/2] + 96*A*Sin[c + (d*x)/2] + 147*C* Sin[c + (d*x)/2] - 80*A*Sin[c + (3*d*x)/2] - 239*C*Sin[c + (3*d*x)/2] - 63 *C*Sin[2*c + (3*d*x)/2] - 15*C*Sin[2*c + (5*d*x)/2] - 15*C*Sin[3*c + (5*d* x)/2] + 3*C*Sin[3*c + (7*d*x)/2] + 3*C*Sin[4*c + (7*d*x)/2]))/(48*a^2*d*(1 + Cos[c + d*x])^2)
Time = 0.64 (sec) , antiderivative size = 147, normalized size of antiderivative = 1.04, number of steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.212, Rules used = {3042, 3521, 25, 3042, 3456, 3042, 3213}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\cos ^2(c+d x) \left (A+C \cos ^2(c+d x)\right )}{(a \cos (c+d x)+a)^2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sin \left (c+d x+\frac {\pi }{2}\right )^2 \left (A+C \sin \left (c+d x+\frac {\pi }{2}\right )^2\right )}{\left (a \sin \left (c+d x+\frac {\pi }{2}\right )+a\right )^2}dx\) |
\(\Big \downarrow \) 3521 |
\(\displaystyle \frac {\int -\frac {\cos ^2(c+d x) (3 a C-a (2 A+5 C) \cos (c+d x))}{\cos (c+d x) a+a}dx}{3 a^2}-\frac {(A+C) \sin (c+d x) \cos ^3(c+d x)}{3 d (a \cos (c+d x)+a)^2}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\frac {\int \frac {\cos ^2(c+d x) (3 a C-a (2 A+5 C) \cos (c+d x))}{\cos (c+d x) a+a}dx}{3 a^2}-\frac {(A+C) \sin (c+d x) \cos ^3(c+d x)}{3 d (a \cos (c+d x)+a)^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {\int \frac {\sin \left (c+d x+\frac {\pi }{2}\right )^2 \left (3 a C-a (2 A+5 C) \sin \left (c+d x+\frac {\pi }{2}\right )\right )}{\sin \left (c+d x+\frac {\pi }{2}\right ) a+a}dx}{3 a^2}-\frac {(A+C) \sin (c+d x) \cos ^3(c+d x)}{3 d (a \cos (c+d x)+a)^2}\) |
\(\Big \downarrow \) 3456 |
\(\displaystyle -\frac {\frac {\int \cos (c+d x) \left (4 a^2 (A+4 C)-3 a^2 (2 A+7 C) \cos (c+d x)\right )dx}{a^2}+\frac {2 (A+4 C) \sin (c+d x) \cos ^2(c+d x)}{d (\cos (c+d x)+1)}}{3 a^2}-\frac {(A+C) \sin (c+d x) \cos ^3(c+d x)}{3 d (a \cos (c+d x)+a)^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {\frac {\int \sin \left (c+d x+\frac {\pi }{2}\right ) \left (4 a^2 (A+4 C)-3 a^2 (2 A+7 C) \sin \left (c+d x+\frac {\pi }{2}\right )\right )dx}{a^2}+\frac {2 (A+4 C) \sin (c+d x) \cos ^2(c+d x)}{d (\cos (c+d x)+1)}}{3 a^2}-\frac {(A+C) \sin (c+d x) \cos ^3(c+d x)}{3 d (a \cos (c+d x)+a)^2}\) |
\(\Big \downarrow \) 3213 |
\(\displaystyle -\frac {\frac {\frac {4 a^2 (A+4 C) \sin (c+d x)}{d}-\frac {3 a^2 (2 A+7 C) \sin (c+d x) \cos (c+d x)}{2 d}-\frac {3}{2} a^2 x (2 A+7 C)}{a^2}+\frac {2 (A+4 C) \sin (c+d x) \cos ^2(c+d x)}{d (\cos (c+d x)+1)}}{3 a^2}-\frac {(A+C) \sin (c+d x) \cos ^3(c+d x)}{3 d (a \cos (c+d x)+a)^2}\) |
-1/3*((A + C)*Cos[c + d*x]^3*Sin[c + d*x])/(d*(a + a*Cos[c + d*x])^2) - (( 2*(A + 4*C)*Cos[c + d*x]^2*Sin[c + d*x])/(d*(1 + Cos[c + d*x])) + ((-3*a^2 *(2*A + 7*C)*x)/2 + (4*a^2*(A + 4*C)*Sin[c + d*x])/d - (3*a^2*(2*A + 7*C)* Cos[c + d*x]*Sin[c + d*x])/(2*d))/a^2)/(3*a^2)
3.1.49.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.) *(x_)]), x_Symbol] :> Simp[(2*a*c + b*d)*(x/2), x] + (-Simp[(b*c + a*d)*(Co s[e + f*x]/f), x] - Simp[b*d*Cos[e + f*x]*(Sin[e + f*x]/(2*f)), x]) /; Free Q[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Sim p[(A*b - a*B)*Cos[e + f*x]*(a + b*Sin[e + f*x])^m*((c + d*Sin[e + f*x])^n/( a*f*(2*m + 1))), x] - Simp[1/(a*b*(2*m + 1)) Int[(a + b*Sin[e + f*x])^(m + 1)*(c + d*Sin[e + f*x])^(n - 1)*Simp[A*(a*d*n - b*c*(m + 1)) - B*(a*c*m + b*d*n) - d*(a*B*(m - n) + A*b*(m + n + 1))*Sin[e + f*x], x], x], x] /; Fre eQ[{a, b, c, d, e, f, A, B}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] & & NeQ[c^2 - d^2, 0] && LtQ[m, -2^(-1)] && GtQ[n, 0] && IntegerQ[2*m] && (In tegerQ[2*n] || EqQ[c, 0])
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.)*((A_.) + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[a*(A + C)*Cos[e + f*x]*(a + b*Sin[e + f*x])^m*((c + d*Sin[e + f*x])^(n + 1)/(f*(b*c - a*d)*(2*m + 1))), x] + Simp[1/(b*(b*c - a*d)*(2*m + 1)) I nt[(a + b*Sin[e + f*x])^(m + 1)*(c + d*Sin[e + f*x])^n*Simp[A*(a*c*(m + 1) - b*d*(2*m + n + 2)) - C*(a*c*m + b*d*(n + 1)) + (a*A*d*(m + n + 2) + C*(b* c*(2*m + 1) - a*d*(m - n - 1)))*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, A, C, n}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && LtQ[m, -2^(-1)]
Time = 1.75 (sec) , antiderivative size = 85, normalized size of antiderivative = 0.60
method | result | size |
parallelrisch | \(\frac {\left (-80 A +\left (\sec ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \left (-12 C \cos \left (2 d x +2 c \right )-163 C \cos \left (d x +c \right )+3 C \cos \left (3 d x +3 c \right )+8 A -140 C \right )\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+48 x d \left (A +\frac {7 C}{2}\right )}{48 a^{2} d}\) | \(85\) |
derivativedivides | \(\frac {\frac {\left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) A}{3}+\frac {\left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) C}{3}-3 A \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-7 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) C +\frac {-10 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) C -6 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) C}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2}}+2 \left (2 A +7 C \right ) \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d \,a^{2}}\) | \(125\) |
default | \(\frac {\frac {\left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) A}{3}+\frac {\left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) C}{3}-3 A \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-7 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) C +\frac {-10 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) C -6 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) C}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2}}+2 \left (2 A +7 C \right ) \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d \,a^{2}}\) | \(125\) |
risch | \(\frac {x A}{a^{2}}+\frac {7 C x}{2 a^{2}}-\frac {i {\mathrm e}^{2 i \left (d x +c \right )} C}{8 a^{2} d}+\frac {i {\mathrm e}^{i \left (d x +c \right )} C}{a^{2} d}-\frac {i {\mathrm e}^{-i \left (d x +c \right )} C}{a^{2} d}+\frac {i {\mathrm e}^{-2 i \left (d x +c \right )} C}{8 a^{2} d}-\frac {2 i \left (6 A \,{\mathrm e}^{2 i \left (d x +c \right )}+12 C \,{\mathrm e}^{2 i \left (d x +c \right )}+9 A \,{\mathrm e}^{i \left (d x +c \right )}+21 C \,{\mathrm e}^{i \left (d x +c \right )}+5 A +11 C \right )}{3 d \,a^{2} \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )^{3}}\) | \(168\) |
norman | \(\frac {\frac {\left (2 A +7 C \right ) x}{2 a}+\frac {\left (A +C \right ) \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{6 a d}-\frac {25 \left (A +4 C \right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 a d}+\frac {2 \left (2 A +7 C \right ) x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}+\frac {3 \left (2 A +7 C \right ) x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}+\frac {2 \left (2 A +7 C \right ) x \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}+\frac {\left (2 A +7 C \right ) x \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 a}-\frac {\left (3 A +13 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 a d}-\frac {\left (5 A +17 C \right ) \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{6 a d}-\frac {\left (5 A +18 C \right ) \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a d}-\frac {\left (35 A +149 C \right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{6 a d}}{a \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{4}}\) | \(278\) |
1/48*((-80*A+sec(1/2*d*x+1/2*c)^2*(-12*C*cos(2*d*x+2*c)-163*C*cos(d*x+c)+3 *C*cos(3*d*x+3*c)+8*A-140*C))*tan(1/2*d*x+1/2*c)+48*x*d*(A+7/2*C))/a^2/d
Time = 0.26 (sec) , antiderivative size = 134, normalized size of antiderivative = 0.95 \[ \int \frac {\cos ^2(c+d x) \left (A+C \cos ^2(c+d x)\right )}{(a+a \cos (c+d x))^2} \, dx=\frac {3 \, {\left (2 \, A + 7 \, C\right )} d x \cos \left (d x + c\right )^{2} + 6 \, {\left (2 \, A + 7 \, C\right )} d x \cos \left (d x + c\right ) + 3 \, {\left (2 \, A + 7 \, C\right )} d x + {\left (3 \, C \cos \left (d x + c\right )^{3} - 6 \, C \cos \left (d x + c\right )^{2} - {\left (10 \, A + 43 \, C\right )} \cos \left (d x + c\right ) - 8 \, A - 32 \, C\right )} \sin \left (d x + c\right )}{6 \, {\left (a^{2} d \cos \left (d x + c\right )^{2} + 2 \, a^{2} d \cos \left (d x + c\right ) + a^{2} d\right )}} \]
1/6*(3*(2*A + 7*C)*d*x*cos(d*x + c)^2 + 6*(2*A + 7*C)*d*x*cos(d*x + c) + 3 *(2*A + 7*C)*d*x + (3*C*cos(d*x + c)^3 - 6*C*cos(d*x + c)^2 - (10*A + 43*C )*cos(d*x + c) - 8*A - 32*C)*sin(d*x + c))/(a^2*d*cos(d*x + c)^2 + 2*a^2*d *cos(d*x + c) + a^2*d)
Leaf count of result is larger than twice the leaf count of optimal. 845 vs. \(2 (133) = 266\).
Time = 1.61 (sec) , antiderivative size = 845, normalized size of antiderivative = 5.99 \[ \int \frac {\cos ^2(c+d x) \left (A+C \cos ^2(c+d x)\right )}{(a+a \cos (c+d x))^2} \, dx=\begin {cases} \frac {6 A d x \tan ^{4}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{6 a^{2} d \tan ^{4}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 12 a^{2} d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 6 a^{2} d} + \frac {12 A d x \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{6 a^{2} d \tan ^{4}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 12 a^{2} d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 6 a^{2} d} + \frac {6 A d x}{6 a^{2} d \tan ^{4}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 12 a^{2} d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 6 a^{2} d} + \frac {A \tan ^{7}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{6 a^{2} d \tan ^{4}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 12 a^{2} d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 6 a^{2} d} - \frac {7 A \tan ^{5}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{6 a^{2} d \tan ^{4}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 12 a^{2} d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 6 a^{2} d} - \frac {17 A \tan ^{3}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{6 a^{2} d \tan ^{4}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 12 a^{2} d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 6 a^{2} d} - \frac {9 A \tan {\left (\frac {c}{2} + \frac {d x}{2} \right )}}{6 a^{2} d \tan ^{4}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 12 a^{2} d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 6 a^{2} d} + \frac {21 C d x \tan ^{4}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{6 a^{2} d \tan ^{4}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 12 a^{2} d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 6 a^{2} d} + \frac {42 C d x \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{6 a^{2} d \tan ^{4}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 12 a^{2} d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 6 a^{2} d} + \frac {21 C d x}{6 a^{2} d \tan ^{4}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 12 a^{2} d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 6 a^{2} d} + \frac {C \tan ^{7}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{6 a^{2} d \tan ^{4}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 12 a^{2} d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 6 a^{2} d} - \frac {19 C \tan ^{5}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{6 a^{2} d \tan ^{4}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 12 a^{2} d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 6 a^{2} d} - \frac {71 C \tan ^{3}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{6 a^{2} d \tan ^{4}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 12 a^{2} d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 6 a^{2} d} - \frac {39 C \tan {\left (\frac {c}{2} + \frac {d x}{2} \right )}}{6 a^{2} d \tan ^{4}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 12 a^{2} d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 6 a^{2} d} & \text {for}\: d \neq 0 \\\frac {x \left (A + C \cos ^{2}{\left (c \right )}\right ) \cos ^{2}{\left (c \right )}}{\left (a \cos {\left (c \right )} + a\right )^{2}} & \text {otherwise} \end {cases} \]
Piecewise((6*A*d*x*tan(c/2 + d*x/2)**4/(6*a**2*d*tan(c/2 + d*x/2)**4 + 12* a**2*d*tan(c/2 + d*x/2)**2 + 6*a**2*d) + 12*A*d*x*tan(c/2 + d*x/2)**2/(6*a **2*d*tan(c/2 + d*x/2)**4 + 12*a**2*d*tan(c/2 + d*x/2)**2 + 6*a**2*d) + 6* A*d*x/(6*a**2*d*tan(c/2 + d*x/2)**4 + 12*a**2*d*tan(c/2 + d*x/2)**2 + 6*a* *2*d) + A*tan(c/2 + d*x/2)**7/(6*a**2*d*tan(c/2 + d*x/2)**4 + 12*a**2*d*ta n(c/2 + d*x/2)**2 + 6*a**2*d) - 7*A*tan(c/2 + d*x/2)**5/(6*a**2*d*tan(c/2 + d*x/2)**4 + 12*a**2*d*tan(c/2 + d*x/2)**2 + 6*a**2*d) - 17*A*tan(c/2 + d *x/2)**3/(6*a**2*d*tan(c/2 + d*x/2)**4 + 12*a**2*d*tan(c/2 + d*x/2)**2 + 6 *a**2*d) - 9*A*tan(c/2 + d*x/2)/(6*a**2*d*tan(c/2 + d*x/2)**4 + 12*a**2*d* tan(c/2 + d*x/2)**2 + 6*a**2*d) + 21*C*d*x*tan(c/2 + d*x/2)**4/(6*a**2*d*t an(c/2 + d*x/2)**4 + 12*a**2*d*tan(c/2 + d*x/2)**2 + 6*a**2*d) + 42*C*d*x* tan(c/2 + d*x/2)**2/(6*a**2*d*tan(c/2 + d*x/2)**4 + 12*a**2*d*tan(c/2 + d* x/2)**2 + 6*a**2*d) + 21*C*d*x/(6*a**2*d*tan(c/2 + d*x/2)**4 + 12*a**2*d*t an(c/2 + d*x/2)**2 + 6*a**2*d) + C*tan(c/2 + d*x/2)**7/(6*a**2*d*tan(c/2 + d*x/2)**4 + 12*a**2*d*tan(c/2 + d*x/2)**2 + 6*a**2*d) - 19*C*tan(c/2 + d* x/2)**5/(6*a**2*d*tan(c/2 + d*x/2)**4 + 12*a**2*d*tan(c/2 + d*x/2)**2 + 6* a**2*d) - 71*C*tan(c/2 + d*x/2)**3/(6*a**2*d*tan(c/2 + d*x/2)**4 + 12*a**2 *d*tan(c/2 + d*x/2)**2 + 6*a**2*d) - 39*C*tan(c/2 + d*x/2)/(6*a**2*d*tan(c /2 + d*x/2)**4 + 12*a**2*d*tan(c/2 + d*x/2)**2 + 6*a**2*d), Ne(d, 0)), (x* (A + C*cos(c)**2)*cos(c)**2/(a*cos(c) + a)**2, True))
Time = 0.31 (sec) , antiderivative size = 236, normalized size of antiderivative = 1.67 \[ \int \frac {\cos ^2(c+d x) \left (A+C \cos ^2(c+d x)\right )}{(a+a \cos (c+d x))^2} \, dx=-\frac {C {\left (\frac {6 \, {\left (\frac {3 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {5 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}\right )}}{a^{2} + \frac {2 \, a^{2} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {a^{2} \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}}} + \frac {\frac {21 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {\sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}}{a^{2}} - \frac {42 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{2}}\right )} + A {\left (\frac {\frac {9 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {\sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}}{a^{2}} - \frac {12 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{2}}\right )}}{6 \, d} \]
-1/6*(C*(6*(3*sin(d*x + c)/(cos(d*x + c) + 1) + 5*sin(d*x + c)^3/(cos(d*x + c) + 1)^3)/(a^2 + 2*a^2*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 + a^2*sin(d* x + c)^4/(cos(d*x + c) + 1)^4) + (21*sin(d*x + c)/(cos(d*x + c) + 1) - sin (d*x + c)^3/(cos(d*x + c) + 1)^3)/a^2 - 42*arctan(sin(d*x + c)/(cos(d*x + c) + 1))/a^2) + A*((9*sin(d*x + c)/(cos(d*x + c) + 1) - sin(d*x + c)^3/(co s(d*x + c) + 1)^3)/a^2 - 12*arctan(sin(d*x + c)/(cos(d*x + c) + 1))/a^2))/ d
Time = 0.27 (sec) , antiderivative size = 137, normalized size of antiderivative = 0.97 \[ \int \frac {\cos ^2(c+d x) \left (A+C \cos ^2(c+d x)\right )}{(a+a \cos (c+d x))^2} \, dx=\frac {\frac {3 \, {\left (d x + c\right )} {\left (2 \, A + 7 \, C\right )}}{a^{2}} - \frac {6 \, {\left (5 \, C \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 3 \, C \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{2} a^{2}} + \frac {A a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + C a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 9 \, A a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 21 \, C a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{6}}}{6 \, d} \]
1/6*(3*(d*x + c)*(2*A + 7*C)/a^2 - 6*(5*C*tan(1/2*d*x + 1/2*c)^3 + 3*C*tan (1/2*d*x + 1/2*c))/((tan(1/2*d*x + 1/2*c)^2 + 1)^2*a^2) + (A*a^4*tan(1/2*d *x + 1/2*c)^3 + C*a^4*tan(1/2*d*x + 1/2*c)^3 - 9*A*a^4*tan(1/2*d*x + 1/2*c ) - 21*C*a^4*tan(1/2*d*x + 1/2*c))/a^6)/d
Time = 1.06 (sec) , antiderivative size = 134, normalized size of antiderivative = 0.95 \[ \int \frac {\cos ^2(c+d x) \left (A+C \cos ^2(c+d x)\right )}{(a+a \cos (c+d x))^2} \, dx=\frac {x\,\left (2\,A+7\,C\right )}{2\,a^2}-\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (\frac {3\,\left (A+C\right )}{2\,a^2}+\frac {2\,C}{a^2}\right )}{d}-\frac {5\,C\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+3\,C\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left (a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+2\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+a^2\right )}+\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (A+C\right )}{6\,a^2\,d} \]